package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;


/**
 * 物料档案对象 查询条件类
 *
 * @author qijian
 * @date 2021-09-01
 */

@Data
@ToString
@TableName("main_item")
public class ItemQuery {

    @WhereType(filed = "item_id")
    private Long itemId;
    @WhereType(filed = "item_code", type = WhereTypeEnum.LIKE)
    private String itemCode;
    @WhereType(filed = "item_code", type = WhereTypeEnum.EQ)
    private String itemCodeEq;
    @WhereType(filed = "item_code", type = WhereTypeEnum.IN)
    private List<String> itemCodeList;
    @WhereType(filed = "item_name", type = WhereTypeEnum.LIKE)
    private String itemName;
    @WhereType(filed = "letter_search")
    private String letterSearch;
    @WhereType(fields = {"main_item.item_code", "main_item.item_name"}, type = WhereTypeEnum.LIKE)
    private String itemCodeOrName;
    @WhereType(filed = "item_classify", type = WhereTypeEnum.LIKE)
    private String itemClassify;
    @WhereType(func = "(FIND_IN_SET({1},sys_classify.ancestors) or sys_classify.id = {1})")
    private Long itemClassifyId;
    @WhereType(filed = "item_spec")
    private String itemSpec;
    @WhereType(filed = "item_source")
    private String itemSource;
    @WhereType(filed = "item_units")
    private String itemUnits;
    @WhereType(filed = "item_type")
    private String itemType;
    @WhereType(filed = "item_attr")
    private String itemAttr;
    @WhereType(filed = "item_version")
    private String itemVersion;
    @WhereType(filed = "item_price")
    private BigDecimal itemPrice;
    @WhereType(filed = "is_disabled")
    private Boolean isDisabled = false;
    @WhereType(filed = "item_long")
    private BigDecimal itemLong;
    @WhereType(filed = "item_wide")
    private BigDecimal itemWide;
    @WhereType(filed = "item_high")
    private BigDecimal itemHigh;
    @WhereType(filed = "item_volume")
    private BigDecimal itemVolume;
    @WhereType(filed = "item_perimeter")
    private BigDecimal itemPerimeter;
    @WhereType(filed = "item_hole")
    private Long itemHole;
    @WhereType(filed = "item_weight")
    private BigDecimal itemWeight;
    @WhereType(filed = "type_name")
    private String typeName;
    @WhereType(filed = "group_name")
    private String groupName;
    @WhereType(filed = "ora_combo")
    private String oraCombo;
    @WhereType(filed = "part_no")
    private String partNo;
    @WhereType(filed = "drawing_no")
    private String drawingNo;
    @WhereType(filed = "item_id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "is_sale")
    private Boolean isSale;
    @WhereType(filed = "is_purchase")
    private Boolean isPurchase;
    @WhereType(filed = "is_stock")
    private Boolean isStock;
    @WhereType(filed = "approval_by")
    private String approvalBy;
    @WhereType(filed = "approval_status")
    private String approvalStatus;
    @WhereType(filed = "qa_quantity")
    private Integer qaQuantity;
    @WhereType(filed = "qa_type")
    private String qaType;
    @WhereType(filed = "scheme_id")
    private Long schemeId;
}
